#include <iostream>
#include <queue>
using namespace std;

const int N = 1e5 + 10;

int n;
int a[N],b[N];

struct node{
	int sum;
	int i,j;
	bool operator < (const node& x) const{
		return sum > x.sum;
	}
};

priority_queue<node> heap;

int main(){
	cin >> n;
	for(int i = 1;i <= n;i++) cin >> a[i];
	for(int i = 1;i <= n;i++) cin >> b[i];
	
	for(int i = 1;i <= n;i++){
		heap.push({a[i] + b[1],i,1});
	}
	
	for(int k = 1;k <= n;k++){
		auto t = heap.top();heap.pop();
		int sum = t.sum,i = t.i,j = t.j;
		cout << sum << " ";
		if(j <= n) heap.push({a[i] + b[j + 1],i,j + 1});
	}
	return 0;
}
